Skip to main content link. Accesskey S
  • HCL Logo
  • HCL Notes and Domino wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Lotus Domino > Domino server tasks > Generate a list of mail files in several .IND files
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Generate a list of mail files in several .IND files

A simple script running on Windows, that lists all mail files in as many indirect files (.ind) as you like. The IND files are ready for processing with any usual Domino tasks.
Community articleGenerate a list of mail files in several .IND files
Added by ~Arnold Kikrogengon | Edited by ~Arnold Kikrogengon on December 28, 2013 | Version 8
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
A simple script running on Windows, that lists all mail files in as many indirect files (.ind) as you like. The IND files are ready for processing with any usual Domino tasks.
Tags: powershell ind
ShowTable of Contents
HideTable of Contents
    • 0.1 Context of use
    • 0.2 Prerequisite
    • 0.3 Get it in one minute
    • 0.4 Script parameters
    • 0.5 Use the .IND files

Context of use

To leverage the power of multi-threading with a Domino server tasks, you have to load the same task several times. But then you have to divide the work between each of them.

Example: I would like to do a quick Fixup on 200 mail databases. That will take 4 less time if I load 4 Fixup tasks, and affect a quarter of the databases to each of them. The problem has always been to build these 4 databases lists in indirect files (IND).

This simple script will do the job in one second. 

Prerequisite

The script is written with Windows PowerShell, so restricted to Windows platform, but not old Windows server.

Get it in one minute

  1. Just open a Windows PowerShell command.
    You may need to open it in ADMIN mode, otherwise you won't have enough rights to write the files.
  2. Look at the script and correct the parameters
  3. Paste the script and run.
  4. Done. The IND files are ready for use in the Data directory.

The script:

$DATA = "d:\ibm\domino\data";$DIRECTORY = "mail";$GROUPSNB = 4 ;$files = Get-ChildItem "$DATA\$directory\*.nsf" -Name; $count = $files.count; $nb = [math]::ceiling($count / $GROUPSNB) ;$groupi = 1 ;$results = @(); $i = 0 ;foreach ($filename in $files){$results += "$directory\$filename";$i += 1 ;if ( $i -eq $nb ) { $results | Out-File "$DATA\$DIRECTORY$groupi.ind" -Encoding "default"; $i = 0 ; $groupi += 1 ; $results = @();};}; if ( $results -ne "" ) { $results | Out-File "$DATA\$DIRECTORY$groupi.ind"  -Encoding "default"; };  Write-Host "succeed: $groupi files have been created, listing $count databases." ; Write-Host "The files are in the directory: $DATA, they are named '$DIRECTORY`X.ind' ,  where X is from 1 to $GROUPSNB." ;

Script parameters

The script takes 3 parameters :

$DATA = Domino DATA Directory

$DIRECTORY = subdirectory under $DATA, usually "mail" directory, but could be "archive" or any directory to process

$GROUPSNB = how many groups do you want to divide the list in ? usually you can load as many tasks as you have CPU cores, or even twice. So if you have 2 CPUs, build 4 ind files, and run 4 tasks like Fixup, Compact..

Use the .IND files

The IND files are waiting for you in the Domino DATA Directory, you can just call:

load fixup mail1.ind

 and so on..

I need this mainly on two cases, where time is running fast:
- when moving with OS copy from one server to another, and need to Fixup the whole (do this offline)
- when enabling DAOS on all mail databases


  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (1)
collapsed Versions (1)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (8)Dec 28, 2013, 1:12:58 AM~Arnold Kikrogengon  Minor change
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL Software
  • Privacy
  • Accessibility